package com.woniuxy.Dao.person;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class TestSpring {
    public static void main(String[] args) {
       /* ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        //Person person = applicationContext.getBean("chinese");//方式一
        Person person = applicationContext.getBean("chinese", Person.class);//方式二
        person.eat();*/
        ApplicationContext applicationContext = new FileSystemXmlApplicationContext("D:\\iedaProjects\\86priject\\day02\\src\\applicationContext.xml");
        Person person = applicationContext.getBean("niceman", Person.class);
        System.out.println(person.toString());
    }


}
